/*
 * SvrTask.cpp
 *
 *  Created on: 2012-7-11
 *      Author: ThinkPad
 */

#include "SvrTask.h"

SvrTask::SvrTask()
{
    Status = SV_INIT;
    svr_heartbeat_task = TASK_CLOSE;
}

SvrTask::~SvrTask()
{

}

int SvrTask::init(SvrConfig * pconfig,Svr_log * plog,SvrFileManage * psvrfilemanage)
{
    if(pconfig == NULL)
        return FAILURE;

    this->pSvrconfig = pconfig;
    this->pSvrlog = plog;
    this->pSvrFileUtils = psvrfilemanage;

    return SUCCESS;
}

/*
*task data handle
*/
int SvrTask::handle_heartbeat_data(char * buf,size_t buf_len)
{
    if(buf == NULL || buf_len == 0 || buf_len > 64)
       return -1;

    /*hanld end*/
    return SUCCESS;
}
